home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / develop™ Technical Journal / develop Issue 25 code / Country Stringing (Newton) / Compile Time Strings / Project Data < prev    next >
Encoding:
Text File  |  1995-12-15  |  1.7 KB  |  65 lines  |  [TEXT/ttxt]

  1. // Copyright ©1994 Apple Computer, Inc.
  2.  
  3. // NOTE: to change the default language,
  4. // go to the Project Settings menu item
  5. // and change the language from English to
  6. // either French or German
  7.  
  8.  
  9.  
  10. // create the languages frame, either by text or by rsrc
  11. constant kFromText := nil ;
  12.  
  13. // create the kLanguagesArray constant for the languages
  14. // textfile method requires only as many languages as
  15. // actual text files.
  16. // resource method requires 5 element array.
  17. DefConst('kLanguagesArray, 
  18. call func(isText)
  19.     if isText then
  20.         '[English, French, German] ;
  21.     else
  22.         '[English, French, German, Other1, Other2]
  23. with (kFromText));
  24.  
  25. if kFromText then
  26.     DefConst('kLangFrame,
  27.         CreateLanguagesFrameFromText(HOME&"StringsCommon.f", kLanguagesArray)) ;
  28. else
  29.     DefConst('kLangFrame,
  30.         CreateLanguagesFrameFromRsrc(HOME & "strings.rsrc", kLanguagesArray)) ;
  31.  
  32.  
  33. SetLocalizationFrame(kLangFrame) ;
  34.  
  35. // define a constant for the english language frame
  36. constant kStrings := kLangFrame.English ;
  37.  
  38. // Application constants ---------------------
  39.  
  40. // only way to replace the application name with NTK 1.5+
  41. ReplaceObject(kAppName, LocObj(kStrings.AppStrings.AppName, 'AppStrings.AppName)) ;
  42.  
  43. constant kMaxApplicationWidth := 240 ;
  44. constant kMaxApplicationHeight := 336 ;
  45.  
  46.  
  47. // THIS IS A 2.0 ONLY installScript
  48. installScript := func(partFrame)
  49. begin
  50.     // change the extras drawer name
  51.     AddDeferredCall(func() GetRoot().extrasDrawer:SetExtrasInfo(kAppSymbol,
  52.         {text: LocObj(kStrings.AppStrings.ExtrasName, 'AppStrings.ExtrasName)}),
  53.         '[]);
  54. end;
  55.  
  56.  
  57. /* 1.x INSTALL SCRIPT
  58. installScript := func(partFrame)
  59. begin
  60.     AddDeferredAction(func() call kSetExtrasInfo with (kAppSymbol,
  61.         {text: LocObj(kStrings.AppStrings.ExtrasName, 'AppStrings.ExtrasName)}),
  62.         '[]);
  63. end;
  64. */
  65.